@section('title')
    找律师 @parent
@show

@section('content')
    {{ HTML::style('css/lawyer.css') }} 
    {{ HTML::style('css/questionlawyer.css')}}
    {{ HTML::script('js/lawyer/lawyerList.js') }}
    {{ HTML::script('js/jquery.lazyload.min.js') }}

{{ HTML::script('js/jquery.raty.js') }}
{{ HTML::script('js/question/limitTextarea.js') }}
{{ HTML::script('js/jquery.SuperSlide.2.1.1.js') }}
{{ HTML::script('js/jQuery-File-Upload-9.7.1/js/vendor/jquery.ui.widget.js') }}
{{ HTML::script('js/jQuery-File-Upload-9.7.1/js/jquery.iframe-transport.js') }}
{{ HTML::script('js/jQuery-File-Upload-9.7.1/js/jquery.fileupload.js') }}

    <div class="container-content clearfix">
        <div class="">
            <div class="">
                <div class="askArea clear">
                    <ul id="filterBox" class="area-wrap area-wrap-box">       
                        <div class="details" id="filterCollapse" style="height:80px;">
                            <li class="area">
                                <span class="title  font18 bold fl">所在城市：</span>
                                <div class="fl type-box-style" id="citiesinit">
                                    <a href="javascript:void(0)" data-id="" class="active">全国</a>
                                </div>
                            </li>
                            <li class="trade">
                                <span class="title  font18 bold fl">问题类型：</span>
                                <div class="type-box fl type-box-style">
                                    <a href="javascript:void(0);" data-id="" class="active">不限</a>
                                </div>
                            </li>
                            <li class="issue">
                                <span class="title font18 bold fl">执业年限：</span>
                                <div class="fl type-box-style">
                                    <a href="javascript:void(0);" class="">不限</a>
                                    @foreach ($practisePeriods as $key => $period)
                                    <a href="javascript:void(0)" data-id="{{ $period['key'] }}">{{ $period['value'] }}</a>
                                    @endforeach
                                </div>
                            </li>

                        </div>
                    </ul>
                    <div class="iconmore">更多</div>
                </div>
                <div class="">
                    <ul id="filterBox" class="area-wrap" style="border:none">
                            <div class="oh type-nav2">
                                <li class="order">

                                    <a href="javascript:void(0);" class="style-type active" data-id="">综合排序</a>
                                    <a href="javascript:void(0);" class="style-type" data-id="case_count">接单数</a>
                                    <a href="javascript:void(0);" class="style-type" data-id="best_evaluated">评分最高</a>
                                    <a href="javascript:void(0);" class="style-type" data-id="price">价格最低</a>
                                    
                                </li>
                                <div class="fr" style="position: relative;">
                                    <form  class="input-wrapper" id="inquery_list_form" method="get" action="{{route('lawyer.list_lawyers')}}">
                                    <div class="search-icon searchIcon" id="subSearch"></div>
                                    <input class="borderR search-input" type="text" id="keyword" placeholder="输入您要咨询的问题 ，搜索现有的答案" onfocus="this.placeholder=''" onblur="this.placeholder='输入您要咨询的问题 ，搜索现有的答案'">
                                    </form>
                                </div>
                            </div>
                    </ul>
                    
                </div>
                <ul id="page" class="searchLawyerList question-list-box2">

                </ul>

                <div class="item_pager">
                    <a href="javascript:void(0);" class="loadMore" style="display:none;margin-bottom:40px;">加载更多</a>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript">
    var jumpUrl ="{{ Config::get('app.url') }}";
    var lawyers_url = "{{route('lawyer.list')}}";
    var city_id = "{{ $city_id }}";
    var user_id = "@if(Auth::user()) Auth::user()->id @endif";
    var islogin = "{{ Auth::check() }}";
    var user_lawyer_url = "{{ route('lawyer.workscopes') }}";
    var token = $("input:[name='_token']").val();
    var is_lawyer = "@if(Auth::user()){{Auth::user()->isVerifiedLawyer()}}@endif";
// enter按键搜索
  $(function(){
    var j = 0;
    document.onkeydown = function(e) {
        var keyword = $("#keyword").val();
        var params ='q='+keyword;
        var e = event || window.event || arguments.callee.caller.arguments[0],
         keycode = e.which || e.keyCode;
         if (keycode==13) {
            if (keyword != null && keyword.length != 0) {
            j++;
                if(!j==0){
                  window.location.href="{{ Config::get('app.url') }}/lawyer/list?"+params; 
                }
            } 
            return false; 
         }else{
            return true;
         }
         stopDefault(e);
    }
  });

    //省市城的参数
    var province_param = "";
    var city_param = "";
    var district_param = "";
    var field_param = "";
    $(function(){
          $('#content').limitTextarea({
            maxNumber:300,     //最大字数
            position:'left', //提示文字的位置，top：文本框上方，bottom：文本框下方
            onOk:function(){
              $('#content').css('background-color','white');    
            },               //输入后，字数未超出时调用的函数
            onOver:function(){
              $('#content').css('background-color','red');    
            }                  //输入后，字数超出时调用的函数，这里把文本区域的背景变为粉红色   
          });
    });
    $(".iconmore").click(function(){
        var details_height = $(".details").height();
        if (details_height == 80) {
            $(".details").css("height","");
            $(".iconmore").css("background","url("+jumpUrl+"/img/more1.png) center no-repeat");
        }else{
            $(".details").css("height","80px");
            $(".iconmore").css("background","url("+jumpUrl+"/img/more.png) center no-repeat");
        }
        
    });
</script>
@show